package com.hotel.meals.controller;


import com.hotel.common.vo.R;
import com.hotel.meals.service.FoodService;
import com.hotel.user.entity.Food;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author KK
 * @since 2024-06-19
 */
@RestController
@RequestMapping("/api")
public class FoodController {
    @Autowired
    private FoodService foodService;

    @GetMapping("/foods")
    public List<Food> getAllFoods(@RequestParam(value="category") String category) {
        return foodService.getAllFoods(category);
    }


}

